<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <script type="text/javascript" src="jquery-3.2.1.js"></script>
    <title>球</title>
</head>
<style>
    * {
        padding: 0;
        margin: 0;
    }
    
    .ball {
        border-radius: 50%;
        width: 200px;
        height: 200px;
        background-image: url("dog.jpg");
        background-size: cover;
        animation-name: dog;
        animation-duration: 1s;
        animation-iteration-count: 10;
    }
    
    @keyframes dog {
        50% {
            transform: translateY(200px) rotateZ(360deg);
        }
        100% {
            transform: translateY(0px) rotateZ(720deg);
        }
    }
    
    .picture {
        margin-left: 500px;
        animation-duration: 2s;
    }
    
    .picture img {
        height: 150px;
        width: 150px;
    }
    
    @keyframes pictures {
        from {
            transform: scale(0, 0);
            opacity: 0;
        }
        to {
            transform: scale(1, 1);
            opacity: 1;
        }
    }
    
    .pictures {
        animation-name: pictures;
        -webkit-backface-visibility: visible !important;
        backface-visibility: visible !important;
    }
</style>

<body>
    <div class="ball"></div>
    <div class="picture">
        <img src="1.jpg">
    </div>
</body>
<script>
    $(function() {
        var btn = $(".picture img");
        var index = 0;
        var isNo = true;
        btn.on("click", function(e) {
            isNo = false;
            index++;
            if (index > 4) {
                index = 1;
            }
            $("img").attr("src", index + ".jpg");
            $(".picture").addClass("pictures")
            setInterval(function(e) {
                $("div").eq(1).removeClass("pictures");
                $("div").dequeue();
                isON = true;
            }, 2000);
        })


    })
</script>

</html>